
local require           = require
local setmetatable      = setmetatable

--加载接口定义文件
local log        = require("modules.commhm.log")

local welfare_lucky_block   = require('modules.business_welfare.welfare_lucky_block')
local welfare_gift          = require('modules.business_welfare.welfare_gift')
local welfare_mall          = require('modules.business_welfare.welfare_mall')
local welfare_accumulate    = require('modules.business_welfare.welfare_accumulate')
local welfare_yxcard        = require('modules.business_welfare.yxcard.welfare_yxcard')
local welfare_lottery       = require('modules.business_welfare.welfare_lottery')
local welfare_viptheme      = require('modules.business_welfare.vip_theme.vip_theme_luckdraw')
local welfare_skinsale      = require('modules.business_welfare.welfare_skin_sale')
--对外提供的接口定义
local FOO = {
    _VERSION = "0.12.1",   -- 版本号
}

local mt = {
    __newindex = function(self, k, v)
        if not FOO[k] then
            FOO[k] = v
        else
            log.error("find same function of name in welfare_acts, name : " .. k)
        end
    end
}
--声明
local service = {}
setmetatable(service, mt)

-- 接口名 = 接口函数指向,

-- welfare_lucky_block 幸运方块
service.lucky_block_enter           = welfare_lucky_block.lucky_block_enter            -- 点击开始抽奖
service.lucky_block_start           = welfare_lucky_block.lucky_block_start            -- 点击开始抽奖
service.lucky_block_pick_rewards    = welfare_lucky_block.lucky_block_pick_rewards     -- 领取奖励
service.lucky_block_data			= welfare_lucky_block.lucky_block_data             -- 玩家数据
service.lucky_block_delete_monkey	= welfare_lucky_block.lucky_block_delete_monkey    -- 看广告后消除猴子
service.lucky_block_destory_reward  = welfare_lucky_block.destory_reward               -- 放弃奖励
service.lucky_block_flush_all       = welfare_lucky_block.lucky_block_flush_all        -- 注册清理角色
service.lucky_block_add_energy      = welfare_lucky_block.lucky_block_add_energy       -- 添加体力接口

--welfare gift 抽奖
service.gift_get   = welfare_gift.test
service.welfare_gift_use_item = welfare_gift.welfare_gift_use_item
service.welfare_gift_buy_gift = welfare_gift.welfare_gift_buy_gift
service.welfare_gift_get_info = welfare_gift.welfare_gift_get_info
service.welfare_gift_buy_mount = welfare_gift.welfare_gift_buy_mount

--welfare mall
service.buy_mount_lotterites = welfare_mall.buy_mount_lotterites

--累计奖励
--查红点
service.check_accumulate_point = welfare_accumulate.check_accumulate_point
--查页面弹窗和找回数据
service.check_accumulate_tags = welfare_accumulate.check_accumulate_tags
--领奖
service.get_accumulate_reward = welfare_accumulate.get_accumulate_reward
--设置玩家数据
service.get_user_accumulate_data = welfare_accumulate.get_user_accumulate_data
service.clear_user_accumulate_data = welfare_accumulate.clear_user_accumulate_data
service.set_accumulate_delta_task = welfare_accumulate.set_accumulate_delta_task
-- 银享卡
-- 激活银享卡
service.welfare_active_yxccard = welfare_yxcard.welfare_active_yxccard
-- 获得银享卡数据
service.welfare_get_yxcdata = welfare_yxcard.welfare_get_yxcdata
-- 领取银享卡奖励
service.welfare_get_prize = welfare_yxcard.welfare_get_prize
-- 获得银享卡ssdb数据
service.welfare_get_ssdb_yxcdata = welfare_yxcard.welfare_get_ssdb_yxcdata

service.welfare_lottery_buy = welfare_lottery.welfare_lottery_buy
service.welfare_lottery_pick_rewards = welfare_lottery.welfare_lottery_pick_rewards
service.welfare_lottery_info = welfare_lottery.welfare_lottery_info
service.welfare_lottery_exchange = welfare_lottery.welfare_lottery_exchange
service.buy_gashapon_lotterites = welfare_mall.buy_gashapon_lotterites

-- 会员主题-抽奖功能
service.payvip_active_sync = welfare_viptheme.payvip_active_sync
service.get_viptheme_drawdata = welfare_viptheme.get_viptheme_drawdata
service.buy_draw_ticket    = welfare_viptheme.buy_draw_ticket
service.request_lucy_draw  = welfare_viptheme.request_lucy_draw
service.get_draw_prize_record= welfare_viptheme.get_draw_prize_record

-- 皮肤售卖活动
service.get_skin_sale_data  = welfare_skinsale.get_skin_sale_data
service.get_skin_sale_award = welfare_skinsale.get_skin_sale_award
return FOO;